package com.liu.community.exception;/*
 *@Author:Liu Xing-zhi
 *Description:
 *Date:Crated in 17:48 2021/10/11
 */

public class CustomerException extends  RuntimeException {
    private  String message;
    private  Integer code;

    public CustomerException(ErrorCode errorCode){
        this.code = errorCode.getCode();
        this.message = errorCode.getMessage();
    }
    @Override
    public String getMessage() {
        return message;
    }

    public Integer getCode() {
        return code;
    }
}
